package com.wtwd.device.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wtwd.device.model.entity.DeviceBloodOxygen;
import com.wtwd.device.model.entity.DeviceBloodOxygenTotal;
import com.wtwd.device.model.entity.DeviceHeartRateTotal;
import com.wtwd.device.model.vo.DeviceBloodOxygenTotalVo;

import java.util.List;

public interface AppDeviceBloodOxygenService extends IService<DeviceBloodOxygen> {


    /**
     * 获取血氧详细信息根据起始时间
     *
     * @param deviceId
     * @param id        存在则大于id的数据 id
     * @param startTime
     * @param endTime
     * @return
     */
    List<DeviceBloodOxygen> getBloodOxygenByTime(Long deviceId, Long id, Long startTime, Long endTime);

    DeviceBloodOxygen getLastDeviceBloodOxygenByDeviceId(Long deviceId);

    /**
     * 查看总表天id一天的数据
     * 如果id不为空查询大于这个id的数据
     *
     * @param totalId
     * @param id
     * @return
     */
    List<DeviceBloodOxygen> getBloodOxygenByTotalIdGtId(Long totalId, Long id);

    /**
     * 根据总表id查询一天的最后一条数据
     *
     * @param totalId
     * @return
     */
    DeviceBloodOxygen getLastDeviceBloodOxygenByTotalId(Long totalId);
}
